<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		div {
			width: 500px;
			height: 300px;
			line-height: 300px;
			background-image: linear-gradient(30deg, red, yellow, green);
			font-size: 80px;
			font-weight: bold;
			text-align: center;
			margin: 0 auto;
			/* border: 10px solid transparent; */
			padding: 10px;
			color: transparent;
			/* 默认值，背景填充到边框，包含边框 */
			/* background-clip: border-box; */
			/* 背景填充到内边距，包含内边距 */
			/* background-clip: padding-box; */
			/* 背景填充到内容，包含内容 */
			/* background-clip: content-box; */
			/* 背景填充到文本，包含文本 */
			background-clip: text;
		}
	</style>
</head>
<body>
	<div>新年快乐</div>
</body>
</html>